home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Fritz: All Fritz
/
All Fritz.zip
/
All Fritz
/
FILES
/
PROGNG_C
/
CFLOW.LZH
/
CFLOW.DOC
< prev
next >
Wrap
Text File
|
1985-06-24
|
3KB
|
91 lines
CFLOW --
a program to reveal C program structure
by Mark Ellington
| as modified for MS-DOS 2 and C86
| by Larry Steeger
In exploring the many C programs available in the public
domain you may discover that many are poorly commented
| (if at all) and use difficult to decipher program structure.
It may be hard to remember how your own programs work when
they are not fresh in your mind. If you want to change a
module what will happen to other functions that use it,
and which ones are they?
| This program, CFLOW, accepts C source files as input
and generates as output to STDOUT a roughly structured
listing of module (function) declarations and the function
calls within them.
The listing is vertically structured according to sequence,
with each module call encountered (i.e. printf(---)) listed
on a new line. The horizontal structuring is strictly in
accordance with the level of open braces "{" at the time
| the module call is read, and is developed by sending 4 spaces
| for each open level at the time the function call is read.
| A function declaration (where the function and its variables
| are declared) will always be at braces level 0 and will be
| at the left margin. For convenience the module declarations
| are preceded by "**" and include their variable declarations
| preceded by " *".
Nesting without braces, as within a multiple level "if"
construct, is not revealed by CFLOW. Include files are
| supported as are #define macros.
To use CFLOW, simply type in:
"CFLOW FILENAME.EXT"
| Use the complete filename (drive:\pathname and extension).
| The structure listing will be sent to the console.
| Output redirection is supported -- to get a printed listing type:
| "CFLOW FILENAME.EXT >PRT:"
or you can use control-P and send to the console as usual.
To route the listing to a disk file type:
"CFLOW FILENAME.EXT >LISTFILE.EXT"
|
M.S.E.
05/27/84
| Addenda for MS-DOS 2/C86 version:
|
| MS-DOS 2 pathnames may be prefixed to any command line/#include
| file names. The '*' and '?' wildcard characters are also
| supported in command line input file names.
|
| Example: "CFLOW \C\*.C" will generate a CFLOW for all
| files in the \C directory on
| the current default drive
| which have a ".C" file extension.
|
| Several flags have been added in the CI-C86 version:
|
| -l prefix each line with its source
| file line number
|
| -f prefix each line with its source
| file name
|
| -hsystem[,project] prefix[es] for #include file names
| (same as C86 v2.20H flag)
|
| -t use '\t' rather than 4 spaces
| for indentation
|
| -x generate input for CFLOWX utility
|
| L.R.S.
| 05/29/85
| <end of cflow.doc>